//
//  BHHTTPHeader.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/12.
//

import UIKit
import Alamofire

class BHHTTPHeader: NSObject {

    static var header: HTTPHeaders {
        get {
            var header: HTTPHeaders = HTTPHeaders.init(["Content-Type":"application/json","version":BHCommonTool.appVersion,"Client":"MoveAPP"])
           
            if BHMeUserInfoModel.shared.token.isEmpty == false {
                header.add(name: "X-Access-Token", value: BHMeUserInfoModel.shared.token)
            }
            return header
        }
    }
    
    static var uploadHeader: HTTPHeaders {
        get {
            var header: HTTPHeaders = HTTPHeaders.init(["Content-Type":"multipart/form-data","version":BHCommonTool.appVersion,"Client":"MoveAPP"])

            if BHMeUserInfoModel.shared.token.isEmpty == false {
                header.add(name: "X-Access-Token", value: BHMeUserInfoModel.shared.token)
            }
            return header
        }
    }
}
